# anonymizer
## Prepare
Install poetry
```sh
pip install poetry==1.8.2
```
Install all necessary libraries:
```sh
poetry install
```

Also for easy testing, you can add all env variables from settings local. Pydantic will take them itself.
For example
```sh
export S3_ACCESS_KEY=abcd
```

### Launch
To start application you need to have activated virtual environment and all required environment variable.
```sh
cp example.env .env
poetry shell
```

## Development

### Dependency Injection

For DI use [punq](https://github.com/bobthemighty/punq). There are a lot of examples in the documentation, but basic scenario is next:

There is a container, that can be got with `get_app_container`.

If we want to register some object, we add a new line:

```python
container.register(SomeObject, SomeObject)
```

That's all. Now you can fetch it from the container with `resolve` method.
You don't have to worry about inner dependencies. Punq will resolve it for you.
